using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Soft2ApiDemo.Domain.Repository
{
    /// <summary>
    /// CRUD接口
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IRepositoryBase<T>
    {
        T GetById(Guid id);



        IQueryable<T> Table { get; }

        void Add(T entity);

        Task<IEnumerable<T>> AddAsync(IEnumerable<T> entities);
        void Update(T entity);

        void Delete(Guid id);
    }
}
